package cn.icatw.gulimall.search.feign;

import cn.icatw.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 产品装服务
 *
 * @author icatw
 * @date 2022/3/19
 * @email 762188827@qq.com
 * @apiNote
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {

    /**
     * 得到attrs信息
     *
     * @param attrId attr id
     * @return {@link R}
     */
    @GetMapping("/product/attr/info/{attrId}")
    R attrInfo(@PathVariable("attrId") Long attrId);

    /**
     * 信息
     *
     * @param brandIds 品牌标识
     * @return {@link R}
     */
    @GetMapping("/product/brand/infos")
    R brandsInfo(@RequestParam("brandIds") List<Long> brandIds);
}
